import http from "@/utils/fetch";

// 上传文件
export function upload(params, sizeLimit = 0, riginalName = 0) {
  params.append("sizeLimit", sizeLimit);
  params.append("riginalName", riginalName);
  return http.upload("/Supplier/upload", params);
}

/**
 * 公共接口
 */
// 获取一级分类
export function getParentCategory() {
  return http.get("/Supplier/Currency/getParentCategory");
}

// 获取省市信息
export function getAreas() {
  return http.get("/Supplier/Currency/getAreas");
}

// 获取省市区信息
export function getRegion() {
  return http.get("/Supplier/Currency/getRegion");
}

// 添加供应商
export function addSupplier(params) {
  return http.post("/Supplier/SupplierApply/addSupplier", params);
}

// 获取所有订单状态
export function getOrderStatus() {
  return http.get("/Supplier/Currency/getOrderStatus");
}
